<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
 <script>
 function sum(a){
        var s=0;
    while(a){
        s=s*10 +a%10;
        a=parseInt(a/10);
    }
    return s;
    }
    document.write(sum(123));

 </script>
  
 </body>
</html>
